package com.yungu.swift.report.controller;

import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.model.admin.AdminReportParam;
import com.yungu.swift.report.entity.ReportIndexOrderNumDay;
import com.yungu.swift.report.service.IndexOrderNumDayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 首页订单量控制器
 */
@RestController
@RequestMapping("/report/indexOrderNumDay")
@Api(value = "【首页统计】", tags = "昨日订单量")
public class IndexOrderNumDayCtrl {

    @Autowired
    private IndexOrderNumDayService indexOrderNumDayService;

    @PostMapping("/queryIndex")
    @ApiOperation(value = "首页统计 — 昨日订单量", httpMethod = "POST")
    public ResponseData<List<ReportIndexOrderNumDay>> queryIndex(@RequestBody AdminReportParam reportParam) {
        return indexOrderNumDayService.queryIndex(reportParam);
    }
}
